static inline struct task_struct * get_current(void)
{
struct task_struct *current;
- __asm__ ( "orl %%esp,%0; movl (%0),%0"
+ __asm__ ( "orl %%esp,%0; andl $~3,%0; movl (%0),%0"
: "=r" (current) : "0" (4092UL) );
return current;
}
static inline void set_current(struct task_struct *p)
{
- __asm__ ( "orl %%esp,%0; movl %1,(%0)"
+ __asm__ ( "orl %%esp,%0; andl $~3,%0; movl %1,(%0)"
: : "r" (4092UL), "r" (p) );
}
static inline unsigned long get_stack_top(void)
{
unsigned long p;
- __asm__ ( "orl %%esp,%0"
+ __asm__ ( "orl %%esp,%0; andl $~3,%0"
: "=r" (p) : "0" (4092UL) );
return p;
}